package Demo01;

import java.util.SplittableRandom;

public class Test {
    public static void main(String[] args) {
        String s1 = "abc";
        char[] chars = s1.toCharArray();
        System.out.println(chars);

        String s2 = String.format("%d,%d",3,5);
        System.out.println(s2);
    }
    public static void main08(String[] args) {
/*        String s1 = String.valueOf(11.1);
        System.out.println(s1);*/
//        int i = Integer.parseInt("123");
        String s1 = "abD";
        System.out.println(s1.toUpperCase());
    }
    public static void main07(String[] args) {
        String s1 = "abcdefabcdef";
        System.out.println(s1.lastIndexOf('a',5));
    }
    public static void main06(String[] args) {
        String s1 = "abcabcabc";
        System.out.println(s1.lastIndexOf("abc",5));
//        System.out.println(s1.indexOf("abc",3));
    }
    public static void main05(String[] args) {
        String s1 = "ababababcd";
        System.out.println(s1.indexOf("abcd"));
    }
    public static void main04(String[] args) {
        String s1 = new String("aaaaa");
        int index = s1.indexOf('a',2);
        System.out.println(index);
    }
    public static void main03(String[] args) {
        String s1 = new String("aaaaa");
        int index = s1.indexOf('a');
        System.out.println(index);

/*        String s1 = new String("abcdef");
        for (int i = 0; i < s1.length(); i++) {
            System.out.print(s1.charAt(i));
        }*/
//        System.out.println(s1.charAt(0));
    }
    public static void main02(String[] args) {
/*        String s1 = new String("abc");
        String s2 = new String("abc");

        System.out.println(s1==s2);
        System.out.println(s1.equals(s2));*/
/*        String s1 = new String("abc");
        String s2 = new String("ab");
        System.out.println(s1.compareTo(s2));*/

/*        String s1 = new String("abc");
        String s2 = new String("ABc");
        System.out.println(s1.compareToIgnoreCase(s2));*/
    }
    public static void main01(String[] args) {
/*        String s1 = new String("abc");
        String s2 = new String("efg");
        String s3 = s2;

        System.out.println("abcd".length());*/
        String s4 = "";
        String s5 = null;
        System.out.println(s4);
        System.out.println(s5);
    }
}
